home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / ADMT / ADMIGRATION.MSI / Cabs.w1.cab / TemplateScript.vbs < prev    next >
Encoding:
Text File  |  2003-03-25  |  23.8 KB  |  628 lines

  1. Option Explicit
  2.  
  3.  
  4. '----------------------------------------------------------------------------
  5. ' ADMT Scripting Notes
  6. '----------------------------------------------------------------------------
  7.  
  8. ' 1 - this template shows all the migration objects and all of the properties
  9. '     and methods of the various migration objects even though a normal
  10. '     script would not use all of the objects and properties
  11.  
  12. ' 2 - optional properties are commented out with the default value shown
  13. '     being assigned
  14.  
  15. ' 3 - service account enumeration would normally occur before user account
  16. '     migration so that services may be updated during user account migration
  17.  
  18.  
  19. '----------------------------------------------------------------------------
  20. ' ADMT Scripting Constants
  21. '----------------------------------------------------------------------------
  22.  
  23. ' RenameOption constants
  24.  
  25. Const admtDoNotRename      = 0
  26. Const admtRenameWithPrefix = 1
  27. Const admtRenameWithSuffix = 2
  28.  
  29. ' PasswordOption constants
  30.  
  31. Const admtPasswordFromName = 0
  32. Const admtComplexPassword  = 1
  33. Const admtCopyPassword     = 2
  34.  
  35. ' ConflictOptions constants
  36.  
  37. Const admtIgnoreConflicting           = &H0000
  38. Const admtReplaceConflicting          = &H0001
  39. Const admtRenameConflictingWithPrefix = &H0002
  40. Const admtRenameConflictingWithSuffix = &H0003
  41. Const admtRemoveExistingUserRights    = &H0010
  42. Const admtRemoveExistingMembers       = &H0020
  43. Const admtMoveReplacedAccounts        = &H0040
  44.  
  45. ' DisableOption constants
  46.  
  47. Const admtEnableTarget       = 0
  48. Const admtDisableSource      = 1
  49. Const admtDisableTarget      = 2
  50. Const admtTargetSameAsSource = 4
  51.  
  52. ' SourceExpiration constant
  53.  
  54. Const admtNoExpiration = -1
  55.  
  56. ' Translation Option
  57.  
  58. Const admtTranslateReplace = 0
  59. Const admtTranslateAdd     = 1
  60. Const admtTranslateRemove  = 2
  61.  
  62. ' Report Type
  63.  
  64. Const admtReportMigratedAccounts  = 0
  65. Const admtReportMigratedComputers = 1
  66. Const admtReportExpiredComputers  = 2
  67. Const admtReportAccountReferences = 3
  68. Const admtReportNameConflicts     = 4
  69.  
  70. ' Option constants
  71.  
  72. Const admtNone     = 0
  73. Const admtData     = 1
  74. Const admtFile     = 2
  75. Const admtDomain   = 3
  76. Const admtRecurse           = &H0100
  77. Const admtFlattenHierarchy  = &H0000
  78. Const admtMaintainHierarchy = &H0200
  79.  
  80.  
  81. '----------------------------------------------------------------------------
  82. ' Declarations
  83. '----------------------------------------------------------------------------
  84.  
  85. Dim objMigration
  86. Dim objUserMigration
  87. Dim objGroupMigration
  88. Dim objComputerMigration
  89. Dim objSecurityTranslation
  90. Dim objServiceAccountEnumeration
  91.  
  92.  
  93. '----------------------------------------------------------------------------
  94. ' ADMT Migration Class
  95. '
  96. ' TestMigration Property
  97. ' - specifies whether a test migration will be performed
  98. ' - optional, the default value is false
  99. '
  100. ' IntraForest Property
  101. ' - specifies whether the migration is intra-forest or inter-forest
  102. ' - the default is inter-forest migration
  103. '
  104. ' SourceDomain Property
  105. ' - specifies the source domain name
  106. ' - the source domain may be specified in either DNS or Flat format
  107. ' - eg. DNS "mydomain.mycompany.com" or Flat "MYDOMAIN"
  108. ' - the source domain must be specified
  109. '
  110. ' SourceOU Property
  111. ' - specifies the source organizational unit (OU)
  112. ' - this property is only applicable for up-level domains (Windows 2000 or later)
  113. ' - the OU must be specified in relative canonical format
  114. ' - eg. "West/Sales"
  115. '
  116. ' TargetDomain Property
  117. ' - specifies the target domain name
  118. ' - the target domain may be specified in either DNS or Flat format
  119. ' - eg. DNS "mydomain.mycompany.com" or Flat "MYDOMAIN"
  120. ' - the target domain must be specified
  121. '
  122. ' TargetOU Property
  123. ' - specifies the target organizational unit (OU)
  124. ' - the OU must be specified in relative canonical format
  125. ' - eg. "West/Sales"
  126. '
  127. ' RenameOption Property
  128. ' - specifies how migrated accounts are to be renamed
  129. ' - optional, default is admtDoNotRename
  130. '
  131. ' RenamePrefixOrSuffix Property
  132. ' - specifies the prefix or suffix to be added to account names
  133. ' - applicable only if RenameOption is admtRenameWithPrefix or
  134. '   admtRenameWithSuffix
  135. '
  136. ' PasswordOption Property
  137. ' - specifies how to generate passwords for migrated accounts
  138. ' - applicable only for inter-forest user migrations and inter-forest group
  139. '   migrations when migrating member users
  140. ' - optional, default is admtComplexPassword
  141. '
  142. ' PasswordServer Property
  143. ' - specifies the server that is to be used for copying passwords
  144. ' - applicable only for inter-forest user migrations and inter-forest group
  145. '   migrations when migrating member users
  146. ' - only applicable if password option specifies copying
  147. '
  148. ' PasswordFile Property
  149. ' - specifies the path of the password file to be created
  150. ' - applicable only for inter-forest user migrations and inter-forest group
  151. '   migrations when migrating member users
  152. ' - optional, default path is the 'Logs' folder in the ADMT installation
  153. '   directory
  154. '
  155. ' ConflictOptions Property
  156. ' - specifies how to handle accounts being migrated that have a naming
  157. '   conflict with a target domain account
  158. ' - the following are the allowable values
  159. '   admtIgnoreConflicting
  160. '   admtReplaceConflicting
  161. '   admtReplaceConflicting + admtRemoveExistingUserRights
  162. '   admtReplaceConflicting + admtRemoveExistingMembers
  163. '   admtReplaceConflicting + admtRemoveExistingUserRights + admtRemoveExistingMembers
  164. '   admtRenameConflictingWithPrefix
  165. '   admtRenameConflictingWithSuffix
  166. ' - optional, default is admtIgnoreConflicting
  167. '
  168. ' ConflictPrefixOrSuffix Property
  169. ' - specifies the prefix or suffix to be added to migrated account names
  170. '   that have a naming conflict with a target domain account
  171. ' - applicable only if ConflictOptions is admtRenameConflictingWithPrefix or
  172. '   admtRenameConflictingWithSuffix
  173. '
  174. ' UserPropertiesToExclude
  175. ' - specifies user properties that are not to be copied from source to target.
  176. ' - note that the asterisk character '*' may be used to exclude all properties
  177. '
  178. ' InetOrgPersonPropertiesToExclude
  179. ' - specifies inetOrgPerson properties that are not to be copied from source to target.
  180. ' - note that the asterisk character '*' may be used to exclude all properties
  181. '
  182. ' GroupPropertiesToExclude
  183. ' - specifies group properties that are not to be copied from source to target.
  184. ' - note that the asterisk character '*' may be used to exclude all properties
  185. '
  186. ' ComputerPropertiesToExclude
  187. ' - specifies computer properties that are not to be copied from source to target.
  188. ' - note that the asterisk character '*' may be used to exclude all properties
  189. '
  190. ' SystemPropertiesToExclude
  191. ' - specifies system properties that are not to be copied from source to target for any objects
  192. ' - the default system properties that are excluded are 'mail' and 'proxyAddresses'
  193. ' - note that the system properties to be excluded are saved in the database and therefore this
  194. '   property only needs to be set once
  195. '
  196. ' CreateUserMigration Method
  197. ' - creates an instance of a user migration object
  198. '
  199. ' CreateGroupMigration Method
  200. ' - creates an instance of a group migration object
  201. '
  202. ' CreateComputerMigration Method
  203. ' - creates an instance of a computer migration object
  204. '
  205. ' CreateSecurityTranslation Method
  206. ' - creates an instance of a security translation object
  207. '
  208. ' CreateServiceAccountEnumeration Method
  209. ' - creates an instance of a service account enumeration object
  210. '
  211. ' CreateReportGeneration Method
  212. ' - creates an instance of a report generation object
  213. '----------------------------------------------------------------------------
  214.  
  215. ' create instance of migration object
  216.  
  217. Set objMigration = CreateObject("ADMT.Migration")
  218.  
  219. ' set options
  220.  
  221. 'objMigration.TestMigration = False
  222. 'objMigration.IntraForest = False
  223. objMigration.SourceDomain = "MYSOURCEDOMAIN"
  224. 'objMigration.SourceOU = ""
  225. objMigration.TargetDomain = "mytargetdomain.mycompany.com"
  226. objMigration.TargetOU = "Users"
  227. 'objMigration.RenameOption = admtDoNotRename
  228. 'objMigration.RenamePrefixOrSuffix = ""
  229. 'objMigration.PasswordOption = admtComplexPassword
  230. 'objMigration.PasswordServer = ""
  231. 'objMigration.PasswordFile = "C:\Program Files\Active Directory Migration Tool\Logs\Password.txt"
  232. 'objMigration.ConflictOptions = admtIgnoreConflicting
  233. 'objMigration.ConflictPrefixOrSuffix = ""
  234. 'objMigration.UserPropertiesToExclude = ""
  235. 'objMigration.InetOrgPersonPropertiesToExclude = ""
  236. 'objMigration.GroupPropertiesToExclude = ""
  237. 'objMigration.ComputerPropertiesToExclude = ""
  238. 'objMigration.SystemPropertiesToExclude = "mail,proxyAddresses"
  239.  
  240.  
  241. '----------------------------------------------------------------------------
  242. ' UserMigration Class
  243. '
  244. ' DisableOption Property
  245. ' - specifies whether to disable source or target account
  246. ' - applicable only for inter-forest migration
  247. ' - optional, default is admtEnableTarget
  248. '
  249. ' SourceExpiration Property
  250. ' - specifies the expiration period of the source account in days
  251. ' - a value of admtNoExpiration specifies no source account expiration
  252. ' - applicable only for inter-forest migration
  253. ' - optional, default is admtNoExpiration
  254. '
  255. ' MigrateSIDs Property
  256. ' - specifies whether to migrate security identifiers to the target domain
  257. ' - applicable only for inter-forest migration
  258. ' - optional, default is false
  259. '
  260. ' TranslateRoamingProfile Property
  261. ' - specifies whether to perform security translation on roaming profiles
  262. ' - optional, default is false
  263. '
  264. ' UpdateUserRights Property
  265. ' - specifies whether to update user rights in the domain
  266. ' - optional, default is false
  267. '
  268. ' MigrateGroups Property
  269. ' - specifies whether to migrate groups that have as members accounts being
  270. '   migrated
  271. ' - optional, default is false
  272. '
  273. ' UpdatePreviouslyMigratedObjects Property
  274. ' - specifies whether previously migrated accounts should be re-migrated
  275. ' - applicable only for inter-forest migration
  276. ' - optional, default is false
  277. '
  278. ' FixGroupMembership Property
  279. ' - specifies whether group memberships will be re-established for migrated
  280. '   accounts
  281. ' - optional, default is true
  282. '
  283. ' MigrateServiceAccounts Property
  284. ' - specifies whether to migrate service accounts
  285. ' - optional, default is false
  286. '
  287. ' Migrate Method
  288. ' - migrate specified user accounts
  289. ' - the first parameter specifies whether the names are directly specified or
  290. '   the names are contained in the specified file or the names are to be
  291. '   enumerated from the specified domain or ou
  292. ' - the second parameter specifies the account names to be included
  293. ' - the third parameter optionally specifies names which are to be excluded
  294. '
  295. ' - Note: Only the specified source OU will be used whether names are
  296. '         directly specified or specified in a file or the domain is
  297. '         searched. If no source OU is specified than the root of the domain
  298. '         is used.
  299. '----------------------------------------------------------------------------
  300.  
  301. ' create instance of user migration object
  302.  
  303. Set objUserMigration = objMigration.CreateUserMigration
  304.  
  305. ' set options
  306.  
  307. 'objUserMigration.DisableOption = admtEnableTarget
  308. 'objUserMigration.SourceExpiration = admtNoExpiration
  309. 'objUserMigration.MigrateSIDs = False
  310. 'objUserMigration.TranslateRoamingProfile = False
  311. 'objUserMigration.UpdateUserRights = False
  312. 'objUserMigration.MigrateGroups = False
  313. 'objUserMigration.UpdatePreviouslyMigratedObjects = False
  314. 'objUserMigration.FixGroupMembership = True
  315. 'objUserMigration.MigrateServiceAccounts = False
  316.  
  317. ' migrate user accounts
  318. ' the following are some examples of specifying the names and exclude names
  319.  
  320. objUserMigration.Migrate admtData, "CN=User1"
  321. objUserMigration.Migrate admtData, Array("/Users/User3","\User4")
  322. objUserMigration.Migrate admtFile, "C:\Users.txt", Array("begins_with*","*contains*","*ends_with")
  323. objUserMigration.Migrate admtDomain, , "C:\ExcludeNames.txt"
  324.  
  325.  
  326. '----------------------------------------------------------------------------
  327. ' GroupMigration Class
  328. '
  329. ' UpdateGroupRights Property
  330. ' - specifies whether to update group domain rights
  331. ' - optional, default is false
  332. '
  333. ' UpdatePreviouslyMigratedObjects Property
  334. ' - specifies whether previously migrated accounts should be re-migrated
  335. ' - applicable only for inter-forest migration
  336. ' - optional, default is false
  337. '
  338. ' FixGroupMembership Property
  339. ' - specifies whether group memberships will be re-established for migrated
  340. '   accounts
  341. ' - optional, default is true
  342. '
  343. ' MigrateSIDs Property
  344. ' - specifies whether to migrate security identifiers to the target domain
  345. ' - applicable only for inter-forest migration
  346. ' - optional, default is false
  347. '
  348. ' MigrateMembers Property
  349. ' - specifies whether to migrate members of groups during migration
  350. ' - optional, default is false
  351. '
  352. ' DisableOption Property
  353. ' - specifies whether to disable source user accounts or target user accounts
  354. '   when copying members
  355. ' - applicable only if copying members in an inter-forest migration
  356. ' - optional, default is admtEnableTarget
  357. '
  358. ' SourceExpiration Property
  359. ' - specifies the expiration period of source user accounts in days when
  360. '   copying members
  361. ' - a value of admtNoExpiration specifies no source user account expiration
  362. ' - applicable only if copying members in an inter-forest migration
  363. ' - optional, default is admtNoExpiration
  364. '
  365. ' TranslateRoamingProfile Property
  366. ' - specifies whether to perform security translation on roaming profiles
  367. ' - applicable only if copying members in an inter-forest migration
  368. ' - optional, default is false
  369. '
  370. ' Migrate Method
  371. ' - migrate specified group accounts
  372. ' - the first parameter specifies whether the names are directly specified or
  373. '   the names are contained in the specified file or the names are to be
  374. '   enumerated from the specified domain or ou
  375. ' - the second parameter specifies the account names to be included
  376. ' - the third parameter optionally specifies names which are to be excluded
  377. '
  378. ' - Note: Only the specified source OU will be used whether names are
  379. '         directly specified or specified in a file or the domain is
  380. '         searched. If no source OU is specified than the root of the domain
  381. '         is used.
  382. '----------------------------------------------------------------------------
  383.  
  384. ' create instance of group migration object
  385.  
  386. Set objGroupMigration = objMigration.CreateGroupMigration
  387.  
  388. ' set options
  389.  
  390. 'objGroupMigration.MigrateSIDs = False
  391. 'objGroupMigration.UpdateGroupRights = False
  392. 'objGroupMigration.UpdatePreviouslyMigratedObjects = False
  393. 'objGroupMigration.FixGroupMembership = True
  394. 'objGroupMigration.MigrateMembers = False
  395. 'objGroupMigration.DisableOption = admtDisableNeither
  396. 'objGroupMigration.SourceExpiration = admtNoExpiration
  397. 'objGroupMigration.TranslateRoamingProfile = False
  398.  
  399. ' migrate group accounts
  400. ' the following are some examples of specifying the names and exclude names
  401.  
  402. objGroupMigration.Migrate admtData, "CN=Group1"
  403. objGroupMigration.Migrate admtData, Array("/Users/Group3","\Group4")
  404. objGroupMigration.Migrate admtFile, "C:\Groups.txt", Array("begins_with*","*contains*","*ends_with")
  405. objGroupMigration.Migrate admtDomain, , "C:\ExcludeNames.txt"
  406.  
  407.  
  408. '----------------------------------------------------------------------------
  409. ' ComputerMigration Class
  410. '
  411. ' - the following translate options specify whether to perform security
  412. '   translation on that type of objects during the computer migration
  413. '
  414. ' TranslateFilesAndFolders Property
  415. ' - specifies whether to perform security translation on files and folders
  416. ' - optional, default is false
  417. '
  418. ' TranslateLocalGroups Property
  419. ' - specifies whether to perform security translation on local groups
  420. ' - optional, default is false
  421. '
  422. ' TranslatePrinters Property
  423. ' - specifies whether to perform security translation on printers
  424. ' - optional, default is false
  425. '
  426. ' TranslateRegistry Property
  427. ' - specifies whether to perform security translation on registry
  428. ' - optional, default is false
  429. '
  430. ' TranslateShares Property
  431. ' - specifies whether to perform security translation on shares
  432. ' - optional, default is false
  433. '
  434. ' TranslateUserProfiles Property
  435. ' - specifies whether to perform security translation on user profiles
  436. ' - optional, default is false
  437. '
  438. ' TranslateUserRights Property
  439. ' - specifies whether to perform security translation on user rights
  440. ' - optional, default is false
  441. '
  442. ' RestartTime Property
  443. ' - specifies the time in minutes to wait before re-booting the computers
  444. '   after migrating
  445. ' - the valid range is 1 to 10 minutes
  446. ' - optional, default is 5 minutes
  447. '
  448. ' Migrate Method
  449. ' - migrate specified computer accounts
  450. ' - the first parameter specifies whether the names are directly specified or
  451. '   the names are contained in the specified file or the names are to be
  452. '   enumerated from the specified domain or ou
  453. ' - the second parameter specifies the account names to be included
  454. ' - the third parameter optionally specifies names which are to be excluded
  455. '
  456. ' - Note: Only the specified source OU will be used whether names are
  457. '         directly specified or specified in a file or the domain is
  458. '         searched. If no source OU is specified than the root of the domain
  459. '         is used.
  460. '----------------------------------------------------------------------------
  461.  
  462. ' create instance of computer migration object
  463.  
  464. Set objComputerMigration = objMigration.CreateComputerMigration
  465.  
  466. ' set options
  467.  
  468. 'objComputerMigration.TranslationOption = admtTranslateAdd
  469. 'objComputerMigration.TranslateFilesAndFolders = False
  470. 'objComputerMigration.TranslateLocalGroups = False
  471. 'objComputerMigration.TranslatePrinters = False
  472. 'objComputerMigration.TranslateRegistry = False
  473. 'objComputerMigration.TranslateShares = False
  474. 'objComputerMigration.TranslateUserProfiles = False
  475. 'objComputerMigration.TranslateUserRights = False
  476. 'objComputerMigration.RestartDelay = 1
  477.  
  478. ' migrate computer accounts
  479. ' the following are some examples of specifying the names and exclude names
  480.  
  481. objComputerMigration.Migrate admtData, "CN=Computer1"
  482. objComputerMigration.Migrate admtData, Array("/Computers/Computer3","\Computer4")
  483. objComputerMigration.Migrate admtFile, "C:\Computers.txt", Array("begins_with*","*contains*","*ends_with")
  484. objComputerMigration.Migrate admtDomain, , "C:\ExcludeNames.txt"
  485.  
  486.  
  487. '----------------------------------------------------------------------------
  488. ' SecurityTranslation Class
  489. '
  490. ' TranslationOption
  491. ' - specifies whether to add, replace or remove entries from access control lists
  492. '
  493. ' TranslateFilesAndFolders Property
  494. ' - specifies whether to perform security translation on files and folders
  495. ' - optional, default is false
  496. '
  497. ' TranslateLocalGroups Property
  498. ' - specifies whether to perform security translation on local groups
  499. ' - optional, default is false
  500. '
  501. ' TranslatePrinters Property
  502. ' - specifies whether to perform security translation on printers
  503. ' - optional, default is false
  504. '
  505. ' TranslateRegistry Property
  506. ' - specifies whether to perform security translation on registry
  507. ' - optional, default is false
  508. '
  509. ' TranslateShares Property
  510. ' - specifies whether to perform security translation on shares
  511. ' - optional, default is false
  512. '
  513. ' TranslateUserProfiles Property
  514. ' - specifies whether to perform security translation on user profiles
  515. ' - optional, default is false
  516. '
  517. ' TranslateUserRights Property
  518. ' - specifies whether to perform security translation on user rights
  519. ' - optional, default is false
  520. '
  521. ' SidMappingFile Property
  522. ' - specifies whether to use a mapping of SIDs from specified file
  523. ' - if a SID mapping file is not specified, then security translation
  524. '   maps SIDs from previously migration objects
  525. ' - optional, default is none
  526. '
  527. ' Translate Method
  528. ' - perform security translation on specified computers
  529. ' - the first parameter specifies whether the names are directly specified or
  530. '   the names are contained in the specified file or the names are to be
  531. '   enumerated from the specified domain or ou
  532. ' - the second parameter specifies the account names to be included
  533. ' - the third parameter optionally specifies names which are to be excluded
  534. ' - if specifying NT4 style names for Windows 2000, or greater, domains the name must be
  535. '   preceded with a backslash
  536. '   eg. \NT4Name
  537. '
  538. ' - Note: The source domain and OU will be used if not explicitly specified
  539. '----------------------------------------------------------------------------
  540.  
  541. ' create instance of security translation object
  542.  
  543. Set objSecurityTranslation = objMigration.CreateSecurityTranslation
  544.  
  545. ' set options
  546.  
  547. 'objSecurityTranslation.TranslationOption = admtTranslateAdd
  548. 'objSecurityTranslation.TranslateFilesAndFolders = False
  549. 'objSecurityTranslation.TranslateLocalGroups = False
  550. 'objSecurityTranslation.TranslatePrinters = False
  551. 'objSecurityTranslation.TranslateRegistry = False
  552. 'objSecurityTranslation.TranslateShares = False
  553. 'objSecurityTranslation.TranslateUserProfiles = False
  554. 'objSecurityTranslation.TranslateUserRights = False
  555. 'objSecurityTranslation.SidMappingFile = "C:\SidMappingFile.txt"
  556.  
  557. ' translate security on specified computers
  558. ' the following are some examples of specifying the names and exclude names
  559.  
  560. objSecurityTranslation.Translate admtData, "CN=Computer2"
  561. objSecurityTranslation.Translate admtData, Array("/Computers/Computer3","\Computer4")
  562. objSecurityTranslation.Translate admtFile, "C:\Computers.txt", Array("begins_with*","*contains*","*ends_with")
  563. objSecurityTranslation.Translate admtDomain, , "C:\ExcludeNames.txt"
  564.  
  565.  
  566. '----------------------------------------------------------------------------
  567. ' ServiceAccountEnumeration Class
  568. '
  569. ' Enumerate Method
  570. ' - enumerate service accounts on specified computers
  571. ' - the first parameter specifies whether the names are directly specified or
  572. '   the names are contained in the specified file or the names are to be
  573. '   enumerated from the specified domain or ou
  574. ' - the second parameter specifies the account names to be included
  575. ' - the third parameter optionally specifies names which are to be excluded
  576. ' - if specifying NT4 style names for Windows 2000, or greater, domains the name must be
  577. '   preceded with a backslash
  578. '   eg. \NT4Name
  579. '
  580. ' - Note: The source domain and OU will be used if not explicitly specified
  581. '----------------------------------------------------------------------------
  582.  
  583. ' create instance of service account enumeration object
  584.  
  585. Set objServiceAccountEnumeration = objMigration.CreateServiceAccountEnumeration
  586.  
  587. ' enumerate service accounts on specified computers
  588. ' the following are some examples of specifying the names and exclude names
  589.  
  590. objServiceAccountEnumeration.Enumerate admtData, "CN=Computer1"
  591. objServiceAccountEnumeration.Enumerate admtData, Array("/Computers/Computer3","\Computer4")
  592. objServiceAccountEnumeration.Enumerate admtFile, "C:\Computers.txt", Array("begins_with*","*contains*","*ends_with")
  593. objServiceAccountEnumeration.Enumerate admtDomain, , "C:\ExcludeNames.txt"
  594.  
  595.  
  596. '----------------------------------------------------------------------------
  597. ' ReportGeneration Class
  598. '
  599. ' Type Property
  600. ' - specifies the type of report to generate
  601. '
  602. ' Folder Property
  603. ' - specifies the folder where reports will be generated
  604. ' - optional, defaults to Reports folder in the ADMT installation folder
  605. '
  606. ' Generate Method
  607. ' - generate specified report
  608. ' - the option should be admtNone for the admtReportMigratedAccounts,
  609. '   admtReportMigratedComputers, admtReportExpiredComputers, and
  610. '   admtReportNameConflicts reports
  611. ' - the option must be admtData, admtFile or admtDomain for the
  612. '   admtReportAccountReferences report
  613. ' - the include parameter must specify the computers upon which to collect
  614. '   account reference information if the admtReportAccountReferences report
  615. '   is specified
  616. '----------------------------------------------------------------------------
  617.  
  618. ' create instance of report generation object
  619.  
  620. Set objReportGeneration = objMigration.CreateReportGeneration
  621.  
  622. ' generate report
  623.  
  624. objReportGeneration.Type = admtReportMigratedAccounts
  625. 'objReportGeneration.Folder = "C:\Program Files\Active Directory Migration Tool\Reports"
  626. objReportGeneration.Generate admtNone
  627. 'objReportGeneration.Generate admtDomain + admtRecurse
  628.